home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
datatypes
/
targa.datatype
/
targa.datatype.guide
(
.txt
)
< prev
next >
Wrap
Amigaguide Document
|
1996-04-07
|
9KB
|
162 lines
@DATABASE "targa.datatype.guide"
@$VER: targa.datatype.guide 39.0 (22.1.95)
@AUTHOR "Arthur Pijpers"
@NODE Main "targa.datatype Documentation"
@{B}Table of Contents@{UB}
@{" Introduction " link Introduction}
@{" Requirements " link Requirements}
@{" How to Install " link Installation}
@{" What is a Targa file ? " link Targa }
@{" What is a datatype? " link Datatypes}
@{" Implementation Details (Release Notes) " link Implementation}
@{" Revision history " link History}
@{" Acknowledgements " link Acknowledgements}
@{" Author " link Author}
@ENDNODE
@NODE Introduction
@{B}Introduction@{UB}
This is V39.0 of the @{"targa" link targa} @{"datatype" link Datatypes}. The version information can be verified
by using the AmigaDOS @{B}version@{UB} command on the datatype file
SYS:classes/datatypes/targa.datatype after installation.
Once installed, the targa datatype means that any datatype-aware programs can
read @{"Targa" link Targa} image files.
Examples of this are that a Targa image can be used as a Workbench screen
backdrop, and Multiview can be used to display them.
The targa datatype is freely distributable, but you may not charge for it,
other than for reasonable media and distribution costs such as those charged
by Fred Fish and other reputable PD libraries.
The targa datatype can be distributed as part of a datatype collection, but
then you have to supply both the 68000 and the 68020 version.
@ENDNODE
@NODE Requirements
@{B}Requirements@{UB}
Datatypes were introduced with Workbench 3.0, so the main requirement is
that you have this version of the OS. Presumably, any future versions of the
OS will also support them.
Do not try to install the datatype if you are using an OS older than 3.0
(i.e. 1.3, 2.04, or 2.1). The correct directories do not exist, and nothing
will work even if you create them. I'm afraid you'll have to find some
other program to view your @{"Targa" link Targa} files with.
When you use the datatype on a computer without the AGA chipset, then
pictures with more than 16 colours hires or 32 colours lores are
automatically dithered to the maximum number of available colours, unless
you have a graphical card added.
24 and 32 bit pictures need AGA chips (or AGA-emulation) to be displayed
correctly.
@ENDNODE
@NODE Installation
@{B}How to Install@{UB}
Installation can be done in one of two ways:
1) Using Installer
2) Manual Installation
If you have a copy of Installer, you can simply double click on the
targa.datatype.install icon and follow the onscreen instructions. The
Installer script follows the manual sequence below, so you are advised to
read it quickly so that you know what to expect.
If you do not have Installer, (which is strange, because you have
Workbench 3), then follow the procedure below:
1) Copy the file targa.datatype.68000 or targa.datatype.68020 to the directory
SYS:classes/datatypes and rename it to targa.datatype (SYS: is a logical name
for the disk you boot from). You can perform the copy either from the
Workbench or the Shell. Use the 68020 version only on Amigas with a 68020
processor or higher.
2) Decide whether you want the datatype to be permanently enabled, or
manually run whenever you want to use it. Proceed to step 3 for a
permanently enabled installation, otherwise proceed to step 4.
3) Copy the file "Targa" to the directory DEVS:Datatypes (DEVS: is a
logical directory on the disk you boot from. It is the same as the DEVS
drawer on the boot disk). If using the Shell, you will also have to
manually copy the icon file "Targa.info". When you reboot your system,
the targa datatype will be avaliable for use.
4) Copy the file "Targa" to the directory SYS:Storage/Datatypes. If
using the Shell, you will also have to manually copy the icon file
"Targa.info".
The targa datatype will not be available until you double click on the
"Targa" icon, at which point it will remain installed until a reboot.
If you already had an older version of the targa.datatype, then you can remove
the files Targa and Targa.info from the DEVS:DataTypes directory.
This completes installation.
@ENDNODE
@NODE Targa
@{B}What is a Targa file ?@{UB}
A Targa file is a graphical file format. It is most of the time used to store
24 bit pictures, but there are also formats for 1 to 8, 15, 16 and 32 bits.
Targa files don't have special characters in the header to recognize it.
Therefor a Targa file can only be recognized by the extension of the filename.
This extension must be .tga or .TGA, or the file will not be recognized.
TARGA and TGA are registered trademarks of Truevision, Inc.
@ENDNODE
@NODE Datatypes
@{B}What is a Datatype?@{UB}
Datatypes were introduced with Workbench 3.0, and provide a way for
applications to read data files without having to learn all the messy
details about how the data in the files are stored.
As an example, consider storing pictures on computer. As Amiga owners, we
are relatively lucky in that all images are stored using the IFF ILBM
format. Other computers have a bewildering array of incompatible formats,
and there exist commercial packages with the sole purpose of converting
images between them.
If I wanted to write a paint program, it would certainly be more useful if
it could read and maybe write out images in some of these other formats.
However, implementing such feature would be a bit of a nightmare, as I would
have to obtain the specifications of these formats, plus some test images,
and write (and support) a significant amount of code to read and write these
various formats.
A datatype is a little program that performs this conversion for me, and
completely hides all the messy implementation details about what file
headers exist, how they are structured, etc. My application can open the
datatypes library, pass a file to it and ask if it recognises the format.
The datatypes library has a look at the file, and then consults its list of
installed datatypes to see if any of them recognise it. It then comes back
to the application with a reply saying "Yup, its a Targa picture".
My application can then ask for the data to be read in, and after a short
while the library will return the information in an Amiga standard format,
in this case, an IFF image. Of course, someone has to write the datatype,
but once written and installed, any other program that uses datatypes can
take advantage of it at no extra cost or expense.
This datatype decodes Targa images, and any application that wishes to read
this format of images can do so without having to know anything about them.
@ENDNODE
@NODE Implementation
@{B}Implementation Details (Release Notes)@{UB}
These are the release notes for V39.0 of the targa datatype.
This implementation will decode @{"Targa" link Targa} files in up to 256 colours.
24 and 32 bit Targa images are converted to HAM8. For 32 bit images, the alpha
channel data are skipped.
15 and 16 bit images have not been implemented yet, because I don't have
complete documentation about the storage format. If anyone can Email me some
more information of the Targa format, then I can try to implement that too.
If you are using Multiview to display @{"Targa" link Targa} files without
the SCREEN tooltype/parameter, the @{"Targa" link Targa} file will be
displayed in a window on the Workbench, it will be quantised down to however
many colours you have set up on your Workbench screen. 24 and 32 bit pictures
however are always shown on a separate HAM8 screen.
If you are using Multiview with the SCREEN tooltype/parameter, the datatype
will choose the screen resolution that it thinks is most appropriate for
displaying the image from the selection available in the display database.
This decision is made using the BestModeID function, and is based on the
size, colour count and aspect ratio of the image.
@ENDNODE
@NODE History
@{B}Revision History@{UB}
Version 39.0 released 22-1-1995
- First release
@ENDNODE
@NODE Acknowledgements
@{B}Acknowledgements@{UB}
targa datatype is based on the BMP datatype.
Many thanks to John Hendrikx (Textdemo/FastView) for the Chunky2Planar and
RGBtoHAM8 routines
targa datatype was compiled using SAS/C V6.51
TARGA and TGA are registered trademarks of Truevision, Inc.
@ENDNODE
@NODE Author
@{B}Author@{UB}
Arthur Pijpers
Please feel free to contact me at:
Usenet : arthurp@grafix.xs4all.nl
FidoNet : 2:286/407.37
AMYNet : 39:153/201.37
NLANet : 14:101/200.37
@ENDNODE